﻿using System.Windows.Forms;

namespace Service_monitoring.Utils.ViewHleper
{
    internal class FormHelper
    {  /// <summary>
       /// 隐藏主体
       /// </summary>
       /// <param name="mainView">传参form</param>
       /// <param name="Width">Width</param>
       /// <param name="Height">Height</param>
       /// <param name="borderStyle">窗体样式</param>
       /// <param name="ControlBox">是否显示 最小化 最大化关闭按钮</param>
        public static void HideView(MainView mainView, int Width, int Height, FormBorderStyle borderStyle, bool ControlBox)
        {
            mainView.Width = Width;
            mainView.Height = Height;
            mainView.FormBorderStyle = borderStyle;

            mainView.ControlBox = ControlBox;
        }

        /// <summary>
        /// 显示窗口主体
        /// </summary>
        /// <param name="mainView">传参form</param>
        /// <param name="Width">Width</param>
        /// <param name="Height">Height</param>
        /// <param name="borderStyle">窗体样式</param>
        /// <param name="ControlBox">是否显示 最小化 最大化关闭按钮</param>
        public static void ShowView(MainView mainView, int Width, int Height, FormBorderStyle borderStyle, bool ControlBox)
        {
            mainView.Width = Width;
            mainView.Height = Height;
            mainView.FormBorderStyle = borderStyle;
            mainView.ControlBox = ControlBox;
        }
    }
}